package com.party.orders.dto;
/**
 * 
 * @author Caizhf
 * @date 2017年8月14日上午1:15:17
 * @version v.0.1
 * @email 1115054416@qq.com 
 *
 * <p>Description: 计算产品总价的对象</p>
 *
 */
public class CountAmountDTOBeta {
	
	private BusAmountDTO busAmount;			//包车
	private TalentAmountDTO talentAmount;	//达人
	private CaterAmountDTO caterAmount;		//餐饮
	private SetMealAmountDTO setMealAmount;	//套餐
	private DecorationProductAmountDTO decProductAmount;	//场地布置下的商品
	private SiteAmountDTO siteAmount;		//场地
	private double totalAmount;				//未使用优惠券前需要支付的总金额数
	private double totalCouponReduce;		//优惠掉的总金额数
	private double totalactualPay;			//实际需要支付的总金额数（减去总的优惠券）
	private boolean isAllCouponReduce;		//使用的劵是否为总劵
	
	
	
	public CountAmountDTOBeta() {
		super();
		busAmount = new BusAmountDTO();
		talentAmount = new TalentAmountDTO();
		caterAmount = new CaterAmountDTO();
		setMealAmount = new SetMealAmountDTO();
		decProductAmount = new DecorationProductAmountDTO();
		siteAmount = new SiteAmountDTO();
		isAllCouponReduce = false;
	}
	
	
	public boolean isAllCouponReduce() {
		return isAllCouponReduce;
	}

	public void setAllCouponReduce(boolean isAllCouponReduce) {
		this.isAllCouponReduce = isAllCouponReduce;
	}



	public BusAmountDTO getBusAmount() {
		return busAmount;
	}
	public void setBusAmount(BusAmountDTO busAmount) {
		this.busAmount = busAmount;
	}
	public TalentAmountDTO getTalentAmount() {
		return talentAmount;
	}
	public void setTalentAmount(TalentAmountDTO talentAmount) {
		this.talentAmount = talentAmount;
	}
	public CaterAmountDTO getCaterAmount() {
		return caterAmount;
	}
	public void setCaterAmount(CaterAmountDTO caterAmount) {
		this.caterAmount = caterAmount;
	}
	public SetMealAmountDTO getSetMealAmount() {
		return setMealAmount;
	}
	public void setSetMealAmount(SetMealAmountDTO setMealAmount) {
		this.setMealAmount = setMealAmount;
	}
	public DecorationProductAmountDTO getDecProductAmount() {
		return decProductAmount;
	}
	public void setDecProductAmount(DecorationProductAmountDTO decProductAmount) {
		this.decProductAmount = decProductAmount;
	}
	public SiteAmountDTO getSiteAmount() {
		return siteAmount;
	}
	public void setSiteAmount(SiteAmountDTO siteAmount) {
		this.siteAmount = siteAmount;
	}
	//自动结算
	public double getTotalAmount() {
		/*totalAmount = siteAmount.getTotalAmount() + talentAmount.getTotalAmount() + 
				caterAmount.getTotalAmount() + busAmount.getTotalAmount() + setMealAmount.getTotalAmount() + 
				decProductAmount.getTotalAmount();*/
		return totalAmount;
	}
	public void setTotalAmount(double totalAmount) {
		this.totalAmount = totalAmount;
	}
	
	//自动结算
	public double getTotalCouponReduce() {
		/*totalCouponReduce = siteAmount.getCouponToalReduce() + talentAmount.getCouponToalReduce() + 
				caterAmount.getCouponToalReduce() + busAmount.getCouponToalReduce() + setMealAmount.getCouponToalReduce() + 
				decProductAmount.getCouponToalReduce();*/
		return totalCouponReduce;
	}
	public void setTotalCouponReduce(double totalCouponReduce) {
		this.totalCouponReduce = totalCouponReduce;
	}
	//自动结算（注意，方法的调用顺序很重要）
	public double getTotalactualPay() {
		totalactualPay = totalAmount - totalCouponReduce;
		return totalactualPay;
	}
	public void setTotalactualPay(double totalactualPay) {
		this.totalactualPay = totalactualPay;
	}
	
	public void addCouponAmount(double couponAmount){
		this.totalCouponReduce += couponAmount;
	}
	@Override
	public String toString() {
		return "CountAmountDTOBeta [busAmount=" + busAmount + ", talentAmount=" + talentAmount + ", caterAmount="
				+ caterAmount + ", setMealAmount=" + setMealAmount + ", decProductAmount=" + decProductAmount
				+ ", siteAmount=" + siteAmount + ", totalAmount=" + totalAmount + ", totalCouponReduce="
				+ totalCouponReduce + ", totalactualPay=" + totalactualPay + "]";
	}
	
	
}
